package com.ruyuan.payment.server.req;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

public class AccountChangeReq {

    @NotNull(message = "【会员】不能为空")
    private Long memberId;

    @NotNull(message = "【金额】不能为空")
    private BigDecimal amount;

    @NotEmpty(message = "【原因】不能为空")
    @Length(max = 50, message = "【原因】不能超过50个字符")
    private String desc;

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "AccountChangeReq{" +
                "memberId=" + memberId +
                ", amount=" + amount +
                ", desc='" + desc + '\'' +
                '}';
    }
}
